package Thread;
//等待一个线程结束再执行另外一个线程
public class Demo9 {
    public static void main(String[] args) throws InterruptedException {
        Thread t=new Thread(()->{
            for (int i=0;i<5;i++){
                System.out.println("t线程正在执行");
            }
        });
        t.start();
        t.join();
        System.out.println("t线程执行结束");
        System.out.println("main线程");

    }
}
